#include <iostream>
#include <set>
#include <vector>
#include <algorithm>

void print(const int &i)
{
    std::cout << i << " ";
}

int main(int argc, char const *argv[])
{
    srand(time(0));
    std::vector<int> vector{};
    for (int i = 0; i < 20; i++)
    {
        vector.push_back(i);
    }
    std::for_each(vector.begin(), vector.end(), print);
    std::cout << std::endl;
    std::reverse(vector.begin(), vector.end());
    std::for_each(vector.begin(), vector.end(), print);
    std::cout << std::endl;

    std::random_shuffle(vector.begin(), vector.end());
    std::for_each(vector.begin(), vector.end(), print);
    std::cout << std::endl;

    std::reverse(vector.begin(), vector.end());
    std::for_each(vector.begin(), vector.end(), print);
    std::cout << std::endl;
    return 0;
}
